<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	template="../templates/user_template.xhtml">

	<ui:define name="css-styles">
		<h:outputStylesheet library="css" name="user_daily_program-style.css" />
	</ui:define>

	<ui:define name="title">
		Програма за деня
	</ui:define>

	<ui:define name="content">

		<h:form>
			<h1 align="center" id="program-header">Програма за деня</h1>
			<p>
				<h:commandButton value="Покажи прожекции за дата " />
				<h:selectOneMenu value="#{flash.chosenDate}">
					<f:selectItems value="#{dailyProgramList.keys}" />
				</h:selectOneMenu>
			</p>
		</h:form>

		<h:panelGroup rendered="#{! empty flash.chosenDate}">
			<h:dataTable value="#{dailyProgramList.dates[flash.chosenDate]}"
				var="item" styleClass="order-table" headerClass="order-table-header"
				rowClasses="order-table-odd-row,order-table-even-row" border="1">

				<h:column>
					<f:facet name="header">
					#{dailyProgramList.dates[flash.chosenDate][0].programInfo}
				</f:facet>
					<h:link value="#{item.name}" outcome="movie_info">
						<f:param name="movie_id" value="#{item.movie_id}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				00:00
    			</f:facet>
					<h:link value="#{item.movie_start[0]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[0]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				10:00
    			</f:facet>
					<h:link value="#{item.movie_start[1]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[1]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				11:00
    			</f:facet>
					<h:link value="#{item.movie_start[2]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[2]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				12:00
    			</f:facet>
					<h:link value="#{item.movie_start[3]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[3]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				13:00
    			</f:facet>
					<h:link value="#{item.movie_start[4]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[4]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				14:00
    			</f:facet>
					<h:link value="#{item.movie_start[5]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[5]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				15:00
    			</f:facet>
					<h:link value="#{item.movie_start[6]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[6]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				16:00
    			</f:facet>
					<h:link value="#{item.movie_start[7]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[7]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				17:00
    			</f:facet>
					<h:link value="#{item.movie_start[8]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[8]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				18:00
    			</f:facet>
					<h:link value="#{item.movie_start[9]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[9]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				19:00
    			</f:facet>
					<h:link value="#{item.movie_start[10]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[10]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				20:00
    			</f:facet>
					<h:link value="#{item.movie_start[11]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[11]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				21:00
    			</f:facet>
					<h:link value="#{item.movie_start[12]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[12]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				22:00
    			</f:facet>
					<h:link value="#{item.movie_start[13]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[13]}" />
					</h:link>
				</h:column>

				<h:column>
					<f:facet name="header">
    				23:00
    			</f:facet>
					<h:link value="#{item.movie_start[14]}" outcome="reservation">
						<f:param name="projection_id"
							value="#{item.movie_projection_id[14]}" />
					</h:link>
				</h:column>

			</h:dataTable>
		</h:panelGroup>

	</ui:define>
</ui:composition>